﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
///RequestObject 的摘要说明
/// </summary>
public class RequestObject
{
	public RequestObject()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    public static string RequstForm(string name)
    {
        return (HttpContext.Current.Request.Form[name] == null ? string.Empty : HttpContext.Current.Request.Form[name].ToString().Trim());
    }
    public static string RequstString(string sParam)
    {
        return (HttpContext.Current.Request[sParam] == null ? string.Empty : HttpContext.Current.Request[sParam].ToString().Trim());
    }
    public static int page
    {
        get { return RequstInt("page"); }
    }
    public static int rows
    {
        get { return RequstInt("rows"); }
    }
    public static int RequstInt(string sParam)
    {
        int iValue;
        string sValue = RequstString(sParam);
        int.TryParse(sValue, out iValue);
        return iValue;
    }
}